/**
* @filename:${entityName}Dao ${createTime}
* @project ${project}  ${version}
* Copyright(c) 2018 ${author} Co. Ltd.
* All right reserved.
*/
package ${daoUrl};

import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import ${entityUrl}.${entityName};
import springmvc.common.CriteriaExample;
import org.apache.ibatis.annotations.Param;

/**
*
* @Description:  ${entityComment}——DAO
* @Author:       ${author}
* @CreateDate:   ${createTime}
* @Version:      ${version}
*
*/
@Mapper
public interface ${entityName}Dao {

<#if (keys?size==1)>
    /**
    * @explain 查询${entityComment}对象
    * @param   对象参数：id
    * @return  ${entityName}
    * @author  ${author}
    */

    public ${entityName} selectByPrimaryKey(${idType} id);

    /**
    * @explain 删除${entityComment}对象
    * @param   对象参数：id
    * @return  int
    * @author  ${author}
    */

    public int deleteByPrimaryKey(${idType} id);

    /**
    * @explain 修改${entityComment}对象
    * @param   对象参数：${entityName}
    * @return  int
    * @author  ${author}
    */
    public int updateByPrimaryKeySelective(${entityName} ${objectName});
<#else>
    public ${entityName} selectByPrimaryKeys(${entityName} ${objectName});

    public int deleteByPrimaryKeys(${entityName} ${objectName});

    public int updateByPrimaryKeySelectives(${entityName} ${objectName});
</#if>

    /**
    * @explain 添加${entityComment}对象
    * @param   对象参数：${entityName}
    * @return  int
    * @author  ${author}
    */
    public int insertSelective(${entityName} ${objectName});

    /**
    * @explain 查询${entityComment}集合
    * @param   对象参数：${entityName}
    * @return  List<${entityName}>
    * @author  ${author}
    */

    public List<${entityName}> query${entityName}List(${entityName} ${objectName});

    public List<${entityName}> query${entityName}All();

    int updateByExample(@Param("${objectName}") ${entityName} ${objectName}, @Param("example") CriteriaExample example);

    List<${entityName}>  selectByExample(@Param("example") CriteriaExample example);

    int countByExample(@Param("example")CriteriaExample example);

    int deleteByExample(@Param("example")CriteriaExample example);
    int deleteList(${entityName} ${objectName});
}
	